<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="CRM"/>
        <meta name="keywords" content="CRM" />
        <title><?php echo isset($title) ? $title . ' - ' : ''; ?>房產管理系統</title>
        <!--
        <link rel="stylesheet" type="text/css" href="/css/main_style.css"/>
        <link rel="stylesheet" type="text/css" href="/css/header.css"/>
        <link rel="stylesheet" type="text/css" href="/css/left.css"/>
        <link rel="stylesheet" type="text/css" href="/css/footer.css"/>        
        <link href="/css/jquery-ui-1.9.2.custom.css" type="text/css" rel="stylesheet">
        -->


        <link href="/css/reset.css" type="text/css" rel="stylesheet">
            <link href="/css/main.css" type="text/css" rel="stylesheet">
                <?
                if(isset($css['font-awesome'])){
                ?>
                <link href="/css/font-awesome.css" type="text/css" rel="stylesheet">
                    <link href="/css/font-awesome-ie7.css" type="text/css" rel="stylesheet">
                        <?
                        }
                        ?>
                        <?
                        if(isset($css['form'])) {
                        ?>
                        <link href="/css/form.css" type="text/css" rel="stylesheet">
                            <?
                            }
                            if(isset($css['table'])) {
                            ?>
                            
                            <link href="/css/table.css" type="text/css" rel="stylesheet">
                            
                                <?
                                }
                                ?>
                                <!-- 旧版   -->
                                <script type="text/Javascript">
                                    var base_url = '<?= base_url() ?>';
                                    var IMGPATH = '<?= IMGPATH ?>';
                                    var SWFPATH = '<?= FLASHPATH ?>';
                                    var JSPATH = '<?= JSPATH ?>';
                                </script>
                                <link rel="stylesheet" href="/css/jquery-ui.css" />
                                <script src="<?= JSPATH ?>jquery-1.7.1.js"></script>
                                <script src="<?= JSPATH ?>jquery-ui.js"></script>
                                <script type="text/Javascript" src="<?= JSPATH ?>common.js"></script>
                                <?
                                if(isset($js['editor'])) {
                                ?>
                                <script charset="utf-8" src="<?= JSPATH ?>kindeditor-4.0.5/kindeditor.js"></script>
                                <script charset="utf-8" src="<?= JSPATH ?>kindeditor-4.0.5/lang/zh_CN.js"></script>
                                <?
                                }
                                if(isset($js['date'])) {
                                ?>
                                <script language="javascript" type="text/javascript" src="<?= JSPATH ?>my97datepicker/WdatePicker.js"></script>
                                <!-- <input class="Wdate" type="text" onClick="WdatePicker()"> -->
                                <?
                                }
                                if(isset($js['pagination'])) {
                                ?>
                                <script language="javascript" type="text/javascript" src="<?= JSPATH ?>pagination.js"></script>
                                <?
                                }
                                if(isset($js['jqgrid'])) {
                                ?>
                                <script language="javascript" type="text/javascript" src="<?= JSPATH ?>jqgrid/js/grid.locale-cn.js"></script>
                                <link href="<?= JSPATH ?>jqgrid/css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
                                <script language="javascript" type="text/javascript" src="<?= JSPATH ?>jqgrid/js/jquery.jqGrid.min.js"></script>
                                <?
                                }
                                if(isset($js['jqueryui'])) {
                                ?>
                                <link type="text/css" href="/css/jquery.ui.1.9.2.ie.css" rel="stylesheet" />	
                                <link type="text/css" href="/css/jquery.ui.1.10.0.ie.css" rel="stylesheet" />
                                <link type="text/css" href="/css/jquery-ui-1.9.2.custom.css" rel="stylesheet" />
                                <link type="text/css" href="/css/jquery-ui-1.10.0.custom.css" rel="stylesheet" />
                                <script type="text/javascript" src="<?= JSPATH ?>jqueryui/js/jquery-ui-1.8.17.custom.min.js"></script>
                                <?
                                }
                                if(isset($js['formvalidator'])) {
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>formvalidator/formValidator-4.1.1.js"></script>
                                <script type="text/javascript" src="<?= JSPATH ?>formvalidator/formValidatorRegex.js"></script>
                                <?
                                }
                                if(isset($js['imgareaselect'])){
                                ?>
                                <link rel="stylesheet" type="text/css" href="<?= JSPATH ?>imgareaselect/css/imgareaselect-default.css" />
                                <script type="text/javascript" src="<?= JSPATH ?>imgareaselect/scripts/jquery.imgareaselect.pack.js"></script>
                                <!-- 
                                $(document).ready(function () {
                                    $('img#photo').imgAreaSelect({
                                        handles: true,
                                        onSelectEnd: someFunction
                                    });
                                });
                                http://odyniec.net/projects/imgareaselect/examples.html
                                -->
                                <?
                                }
                                if(isset($js['uploadify'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>uploadify/swfobject.js"></script>
                                <script type="text/javascript" src="<?= JSPATH ?>uploadify/jquery.uploadify.v2.1.4.min.js"></script>
                                <!-- 
                                $(document).ready(function() {
                                  $('#file_upload').uploadify({
                                    'uploader'  : '/uploadify/uploadify.swf',
                                    'script'    : '/uploadify/uploadify.php',
                                    'cancelImg' : '/uploadify/cancel.png',
                                    'folder'    : '/uploads',
                                    'auto'      : true
                                  });
                                });
                                
                                <input id="file_upload" type="file" name="file_upload" />
                                -->
                                <?
                                }
                                if(isset($js['purview'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>purview.js"></script>
                                <?
                                }
                                if(isset($js['client'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>client.js"></script>
                                <?
                                }
                                if(isset($js['client_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>client_ready.js"></script>
                                <?
                                }
                                if(isset($js['client_data_query_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>client_data_query_ready.js"></script>
                                <?
                                }
                                if(isset($js['client_data_edit_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>client_data_edit_ready.js"></script>
                                <?
                                }
                                if(isset($js['demand'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>demand.js"></script>
                                <?
                                }
                                if(isset($js['demand_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>demand_ready.js"></script>
                                <?
                                }
                                if(isset($js['demand_data_query_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>demand_data_query_ready.js"></script>
                                <?
                                }
                                if(isset($js['object'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>object.js"></script>
                                <?
                                }
                                if(isset($js['object_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>object_ready.js"></script>
                                <?
                                }
                                if(isset($js['object_data_query_ready'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>object_data_query_ready.js"></script>
                                <?
                                }
                                if(isset($js['base_data'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>base_data.js"></script>
                                <?
                                }
                                if(isset($js['address'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>address.js"></script>
                                <?
                                }
                                if(isset($js['park'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>park.js"></script>
                                <?
                                }
                                if(isset($js['school'])){
                                ?>
                                <script type="text/javascript" src="<?= JSPATH ?>school.js"></script>
                                <?
                                }
                                if(isset($js['map'])){
                                ?>
                                <!--<script type="text/javascript"
                                      src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCEqUa9YSkEVVvSy1wS5NnMrsqzo1FPpi0&sensor=false&callback=initialize">
                                    </script>-->
                                <link href="/css/map.css" type="text/css" rel="stylesheet">
                                    <script type="text/javascript" src="<?= JSPATH ?>map.js"></script>
                                    <?
                                    }
                                    if(isset($js['consignment'])){
                                    ?>
                                    <script type="text/javascript" src="<?= JSPATH ?>consignment.js"></script>
                                    <?
                                    }
                                    if(isset($js['table'])){
                                    ?>
                                    <script type="text/javascript" src="<?= JSPATH ?>table.js"></script>
                                    <?
                                    }
                                    ?>
                                    </head>
                                    <body>
                                        <?
                                        if (!$this->login_lib->users_id())
                                        redirect("/");
                                        my_permissios();
                                        ?>
                                        <div class="pagetop">
                                            <div class="head pagesize">
                                                <!-- *** head layout *** -->
                                                <div class="head_top">
                                                    <div class="topbuts">
                                                        <ul class="clear">
                                                            <li><a href="#" class="welcome"><?
                                                                    if ($this->login_lib->users_id())
                                                                    echo "歡迎你，".$this->login_lib->users_name();
                                                                    else 
                                                                    echo "您還未登錄".$this->login_lib->users_id();
                                                                    ?></a></li>
                                                            <li><a href="#">通知</a></li>
                                                            <li><a href="#">帳號</a></li>
                                                            <li><a class="red" href="<?= site_url('/login/logout') ?>">退出帳號</a></li>
                                                        </ul>
                                                    </div>
                                                    <div class="logo clear"> <a href="<?= site_url('/main') ?>"> <img class="picture" alt=""  src="/images/logo.png"> <span class="textlogo"> <span class="title"><img src="/images/title.png" border="0" /></span><span class="text"><img src="/images/title_eng.png"  border="0"/></span> </span> </a> </div>
                                                </div>
                                                <?= isset($menu) ? $menu : '' ?>
                                            </div>
                                        </div>
                                        <div class="breadcrumb">
                                            <div class="bread-links pagesize">
                                                <ul class="clear">
                                                    <li class="first">當前頁面：</li>
                                                    <li><a href="#"><?php echo isset($title) ? $title : ''; ?></a></li>
                                                </ul>
                                            </div>
                                        </div>